package mest.service.Modeling.Impl;

import mest.dao.Modeling.IModelFileDao;
import mest.entity.model_file;
import mest.service.Modeling.IModelFileService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description
 * @auther Machenike
 * @create 2019-11-16 14:26
 */
@Service
public class ModelFileServiceImpl implements IModelFileService {

    @Resource
    private IModelFileDao imfd;

    @Override
    public int insertModelFileType(model_file ct) {
        try {
            return imfd.insertModelFileType(ct);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return -1;
    }

    @Override
    public int selectCount() {
        return imfd.selectCount();
    }

    @Override
    public List<model_file> findModelFilePage(int index, int pageSize) {
        return imfd.findModelFilePage((index-1)*pageSize,pageSize);
    }
}
